<template>
	<view class="demandDetails ">
		<!-- scroll -->
		<popUp :type="1" :blink="blink" :user="user_info" :isShowFirst="false" @change="getUserInfo"></popUp>
		<view class="pd15 bgcf">
			<!-- <popUp style="margin-left: 0;"></popUp> -->
			<view class="" style="display: flex;justify-content: space-between;">
				<h2 class="f20 c28 f600 db" style="max-width: 540rpx;">{{ info.spare_parts_name }}</h2>
				<view class="" v-if="info.is_quotation !== 0"
					style="display:flex;align-items:center;justify-content:flex-end; flex:1;white-space: nowrap;font-size: 24rpx;font-size: 24rpx;text-align: right;font-weight: bold;color: #1050c7;">
					已报价:{{ info.list.filter(item=>item.status===2).length }}
				</view>
			</view>
			<view class="df ac f12 c9d mt8 bbf1 pb15">
				<span>{{ info.company }}</span>
				<!-- <span>{{info.created_at}}</span> -->
				<!-- <span class='ml30'>{{info.views}}人已查看</span> -->
			</view>
			<view class="pd150 bbf1">
				<view class="" style="display: flex;align-items: center;">
					<h2 class="f16 c23 f600 db">订单信息</h2>
					<view>
						<view class="tag tag1 ml4" v-if="grade > 0 && info.view_type > 0">
							<text v-if='info.view_type == 1'>免费</text>
							<text v-if='info.view_type == 2'>VIP</text>
							<text v-if='info.view_type == 3'>至尊</text>
						</view>
					</view>
				</view>
				<ul class="df ac fw mt5">
					<li class="mt8 df ac w50">
						<p class="w68 f14 c9d">询价时间</p>
						<span class="f14 c28">{{ info.created_at }}</span>
					</li>
					<li class="mt8 df ac w50">
						<p class="w68 f14 c9d">报价截止</p>
						<span class="f14 c28">{{ info.end_at }}</span>
					</li>
					<li class="mt8 df ac w50" v-if="info.procurement_area">
						<p class="w68 f14 c9d">采购区域</p>
						<span class="f14 c28">{{ info.procurement_area }}</span>
					</li>
					<li class="mt8 df ac w50">
						<p class="w68 f14 c9d">交货地</p>
						<span class="f14 c28">{{ info.province + info.city }}</span>
					</li>
				</ul>
				<view v-if="info.type == 2">
					<ul class="db mt12" v-if="info.file.length != 0 || info.drawing.length != 0">
						<li class="df ac mt8">
							<p class="c9d f14 w68">附件</p>
							<span
								style='background:#1050c7;color: #FFF;font-size: 28rpx;font-weight: bold;padding: 4rpx 20rpx;border-radius: 100rpx;'
								@tap.native="allowNotifications($event, { i: 0, lj_name: info.spare_parts_name, img: info.drawing, name: info.file_name, file: info.file })"
								:data-i="0" :data-lj_name="info.spare_parts_name" :data-img="info.drawing"
								:data-name="info.file_name" :data-file="info.file"> 查看图纸 </span>
							<view class="df ac jc xy-box" @tap="onAgreement" v-if="info.is_secrecy == 1">
								<image class="img14" src="https://wx.xtwaixie.com/img/lock.png"></image>
								<p class="f12 c10 ml4">保密协议</p>
							</view>
						</li>
						<li class="df ac mt8" v-if="info.is_secrecy == 1">
							<p class="c9d f14 w68"></p>
							<span class="f12 cf5">该询价单包含商业机密，需签订保密协议后才能查看</span>
						</li>
					</ul>
					<view class="mt12 df ac" v-if="info.file.length == 0 && info.drawing.length == 0">
						<p class="c9d f14 w68">附件</p>
						<span class="f12 cf5">*该订单未上传图纸，请联系采购商索取</span>
					</view>
				</view>
			</view>
			<view class="pd150 bbf1" v-if="info.type == 1">
				<h2 class="f16 c23 f600 db">交付信息</h2>
				<ul class="df ac fw mt5">
					<li class="mt8 df ac w50">
						<p class="w82 f14 c9d">是否含税</p>
						<span class="f14 c28">{{ info.is_tax_include }}</span>
					</li>
					<li class="mt8 df ac w50">
						<p class="w82 f14 c9d">是否含运费</p>
						<span class="f14 c28">{{ info.is_freight }}</span>
					</li>
					<!-- <li class="mt8 df ac w50" style="width:100%">
						<p class="w82 f14 c9d">交货时间</p>
						<span class="f14 c28">{{ info.delivery_at }}</span>
					</li> -->
					<li class="mt8 df ac w50" style="width:100%">
						<p class="w82 f14 c9d">付款方式</p>
						<span class="f14 c28">{{ info.is_budget }}</span>
						<!-- <span class="f14 c28">手动输入</span> -->
					</li>
				</ul>
			</view>
			<!-- 零件信息 -->
			<view class="pt15" v-if="info.type == 1">
				<h2 class="f16 c23 f600 db">零件信息</h2>
				<ul class="db">
					<block v-for="(item, index) in info.DemandParts" :key="index">
						<li class="mt15 db pr">
							<p class="lj-title">零件{{ index + 1 }}</p>
							<image class="lj-img" referrerPolicy='no-referrer' :src="item.redrawing"></image>
							<ul class="db">
								<li class="df ac mt12">
									<p class="c9d f14 w40">名称</p>
									<span class="f14 c28">{{ item.spare_parts_name }}</span>
								</li>
								<li class="df ac mt8 demand_tit" v-if="item.machining_name">
									<p class="c9d f14 w40">工艺</p>
									<span class="f14 c28"
										style="display: block;width: 220px;">{{ item.machining_name.split(" ").join("、") }}</span>
								</li>
								<li class="df ac mt8" v-if="item.material">
									<p class="c9d f14 w40">材料</p>
									<span class="f14 c28">{{ item.material }}</span>
								</li>
								<li class="df ac mt8">
									<p class="c9d f14 w40">数量</p>
									<span
										class="f14 c28">{{ item.number ? item.number + item.piece : item.piece }}</span>
								</li>
								<li class="df mt8" v-if="item.remarks">
									<p class="c9d f14 w40">备注</p>
									<span class="f14 c28 f1">{{ item.remarks }}</span>
								</li>
								<li class="db" v-if="item.file.length != 0 || item.drawing.length != 0">
									<view class="df ac mt8">
										<p class="c9d f14 w40">附件</p>
										<span
											style='background:#1050c7;color: #FFF;font-size: 28rpx;font-weight: bold;padding: 4rpx 20rpx;border-radius: 100rpx;'
											@tap.native="allowNotifications($event, { i: index, lj_name: item.spare_parts_name, img: item.drawing, name: item.file_name, file: item.file })"
											:data-i="index" :data-lj_name="item.spare_parts_name"
											:data-img="item.drawing" :data-name="item.file_name" :data-file="item.file">
											查看图纸 </span>
										<view class="df ac jc xy-box" @tap="onAgreement" v-if="info.is_secrecy == 1">
											<image class="img14" src="https://wx.xtwaixie.com/img/lock.png"></image>
											<p class="f12 c10 ml4">保密协议</p>
										</view>
									</view>
									<view class="df ac mt8" v-if="info.is_secrecy == 1">
										<p class="c9d f14 w40"></p>
										<span class="f12 cf5">该询价单包含商业机密，需签订保密协议后才能查看</span>
									</view>
								</li>
								<li class="mt12 df ac" v-if="item.file.length == 0 && item.drawing.length == 0">
									<p class="c9d f14 w40">附件</p>
									<span class="f12 cf5">*该订单未上传图纸，请联系采购商索取</span>
								</li>
							</ul>
						</li>
					</block>
				</ul>
				<!-- 掩盖图层（登录按钮） -->
				<!-- v-if="!uni.getStorageSync('token')" -->
				<!-- v-if="!isLoggedIn" -->
				<!--  v-if="isLoggedIn" -->
				<!-- <view class="detailedness_box_after">
					<view class="detailedness_view" style="text-align: center;color:#fff;line-height: 45rpx;">
						登录后可查看更多订单信息
						<view class="detailedness_btn" @click="isLoginIphone()">登录</view>
					</view>
				</view> -->
			</view>
			<!-- <view class='mt10 bgcf'>
    <h2 class='db pd15 f16 c28 f600'>图纸</h2>
    <block wx:for="{{info.drawing}}" wx:key='index'>
      <image class="w100 db" src="{{item}}" mode="widthFix" bindtap='onImg' data-src='{{item}}' data-path='{{info.drawing}}' />
    </block>
  </view>
  <view class='df ac sb mt20'>
    <button class="share-but df ac" bindtap='onSee' data-type='{{0}}'>
    <button class="share-but df ac jc" open-type='share' wx:if='{{share_num < 2}}'>
      <image class="img16 mr12" src="../../img/fx.png" />
      <h2 class='f14 c28 f500 db'>分享</h2>
    </button>
    <button class="share-but df ac jc" wx:else bindtap='onShareTips'>
      <image class="img16 mr12" src="../../img/fx.png" />
      <h2 class='f14 c28 f500 db'>分享</h2>
    </button>
    <button class="share-but df ac" bindtap='onSee' data-type='{{1}}'>
    <button class="share-but df ac" bindtap='goWeb'>
      <image class="img16 mr12" src="../../img/fx1.png" />
      <view class=''>
        <h2 class='f12 c28 f500 db tl'>关注公众号</h2>
        <p class='f10 cff8 db'>实时推送最新订单</p>
      </view>
    </button>
  </view> -->
		</view>
		<view class="pd15 pb20 bgcf mt10" style="padding-top:0" v-if="!is_purchaser">
			<view style="position:relative">
				<h2 class="f16 c28 f600 db" style="display:flex;padding-top:30rpx">采购商信息 <p
						v-if="info.is_quotation === 1" style="margin-left: 10px;font-size: 28rpx;color: red;">
						*在线报价，后联系采购商</p>
					<p v-else style="margin-left: 10px;font-size: 28rpx;color: red;">*先联系采购商，线下报价</p>
				</h2>
				<ul class="db">
					<li class="df ac mt10">
						<p class="f14 c9d w80">企业名称</p>
						<p class="f14 c28">{{ info.company }}</p>
					</li>
					<li class="df ac mt10">
						<p class="f14 c9d w80">联系人</p>
						<p class="f14 c28">{{ info.username }}</p>
					</li>
					<li class="df ac mt10" @tap.native="onCall($event, { mobile: info.mobile })"
						:data-mobile="info.mobile">
						<p class="f14 c9d w80">联系方式</p>
						<p class="f14 c28">{{ info.mobile }}</p>
						<P class="cop-but ml30" v-if="info.mobile !== '****'" :data-text="info.mobile"
							@tap.stop="copyText($event, { text: info.mobile })">复制</P>
					</li>
					<li class="df ac mt10" v-if="info.email">
						<p class="f14 c9d w80">
							<image src="@/static/success.png" mode="widthFix" style="height: 40rpx;width: 40rpx;">
							</image>
						</p>
						<p class="f14 c28">{{ info.email }}</p>
						<P class="cop-but ml30" v-if="info.email !== '****'" :data-text="info.email"
							@tap.native="copyText($event, { text: info.email })">复制</P>
					</li>
				</ul>
				<view style='margin:20rpx 0;height:1rpx;background:#ebedf0;width:100%'></view>
				<view v-show="info.basic">
					<h2 class="f16 c28 f600 db" style="display:flex">采购商工商信息 </h2>
					<view class="companyProduct" style="padding-bottom: 40rpx;margin-top:20rpx">
						<view class="">
							<view class="Business-Infor">
								<view>
									<view class="Business-title">公司名称</view>
									<view class="Business-Miao">{{info.basic.Name}}</view>
								</view>
								<view>
									<view class="Business-title">成立时间</view>
									<view class="Business-Miao"> {{info.basic.StartDate?info.basic.StartDate:'-'}}
									</view>
								</view>
								<view style="border-bottom: 1px solid gainsboro;">
									<view class="Business-title">注册资本</view>
									<view class="Business-Miao">{{info.basic.RegistCapi?info.basic.RegistCapi:'-'}}
									</view>
								</view>
							</view>
							<view v-show="info_num.user_demand"
								style="margin-top:20rpx;font-size:24rpx;color:#409EFF;text-align: center;"
								@click="show_company = true"> 查看全部工商信息 </view>
						</view>
						<view>
							<van-action-sheet :actions=" actions " :show="show_company" title="工商信息"
								@close="show_company = false">
								<view class="" style="margin-top: 48px;">
									<view class="BusiN-t">
										<view class="Busi-left"> 公司名称 </view>
										<view class="Busi-right"> {{info.basic.Name}} </view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 注册地址 </view>
										<view class="Busi-right"> {{info.basic.Address}} </view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 法定代表人名称 </view>
										<view class="Busi-right">
											{{info.basic.OperName?info.basic.OperName:'-'}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 企业类型 </view>
										<view class="Busi-right">
											{{info.basic.EconKind?info.basic.EconKind:'-'}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 成立时间 </view>
										<view class="Busi-right">
											{{info.basic.StartDate?info.basic.StartDate:'-'}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 注册资本 </view>
										<view class="Busi-right">
											{{info.basic.RegistCapi ?info.basic.RegistCapi:"-"}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 统一社会信用代码 </view>
										<view class="Busi-right">
											{{info.basic.CreditCode&&info.basic.CreditCode!=null?info.basic.CreditCode:"-"}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 登记状态 </view>
										<view class="Busi-right">
											{{info.basic.Status?info.basic.Status:'-'}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 工商注册号 </view>
										<view class="Busi-right">
											{{info.basic.No&&No!=null?info.basic.No:"-"}}
										</view>
									</view>
									<view class="BusiN-t">
										<view class="Busi-left"> 经营范围 </view>
										<view class="Busi-right">
											{{info.basic.Scope&&info.basic.Scope!=null?info.basic.Scope:"-"}}
										</view>
									</view>
									<view class="BusiN-t"
										style="border-bottom:1px solid gainsboro ;margin-bottom: 60rpx;">
										<view class="Busi-left"> 实缴资本 </view>
										<view class="Busi-right">
											{{info.basic.RecCap && info.basic.RecCap!=null ?info.basic.RecCap:"-"}}
										</view>
									</view>
								</view>
							</van-action-sheet>
						</view>
					</view>
				</view>
				<!-- <view v-if="!is_login" class="detailedness_box_after"
					style='height:100%;padding-top:0;display:flex;align-items:center'>
					<view class="detailedness_view" style="text-align: center;color:#fff;line-height: 45rpx;">
						需登录后查看
						<view class="detailedness_btn" @click="isLoginIphone()">登录</view>
					</view>
				</view> -->
			</view>




			<!-- 查看信息 -->
			<view class="email df ac sb mt15"
				v-if="user_info.vip_end_date <= 30 && (user_info.status != 1 || user_info.status != 3) && user_info.grage === 2">
				<!-- <view class="f1">
					<p class="f14 cff8 f500 db">免费报价剩余次数：{{ user_info.free_number }}次</p>
				</view> -->
				<view class="f1">
					<p class="f14 cff8 f500 db" style="width: 510rpx;">会员{{ user_info.vip_end_date }}天后到期</p>
				</view>
				<button class="email-but f12"
					style="height: auto;line-height: 1;width: 140rpx !important;border-radius: 200rpx;padding: 10rpx 0;"
					@tap='member2'>
					<view class="f13">
						立即续费
					</view>
				</button>
			</view>


			<view class="email df ac sb mt15" v-if="!type && info.quotation && info.quotation.status !== 2">
				<view class="f1" v-if="info.quotation.status === 1">
					<p class="f14 cff8 f500 db">报价审核中</p>
				</view>
				<view class="f1" v-else>
					<p class="f14 cff8 f500 db">报价驳回 原因：
					<p style="color:red">{{ info.quotation.reason }}</p>
					</p>
				</view>
				<button class="email-but" style="height: 52rpx;line-height: 52rpx;width: 200rpx !important;"
					@tap="quotationUrl(info)">查看我的报价</button>
			</view>
			<!-- info.is_end && info.is_mobile == 1 && -->
			<view class="email df ac sb mt15" v-else-if=" info.quotation.status == 2">
				<view class="f1">
					<p class="f14 cff8 f500 db" style="color: green;">报价已完成</p>
				</view>
				<button class="email-but" style="height: 52rpx;line-height: 52rpx;width: 200rpx !important;"
					@tap="quotationUrl(info)">查看我的报价</button>
			</view>
			<view class="email df ac sb mt15" v-else-if="user_info.grade == 0 && status == 3">
				<view class="f1">
					<p class="f14 cff8 f500 db">驳回原因 {{ bh_reason }}</p>
				</view>
				<button class="email-but" style="height: 52rpx;line-height: 52rpx;" @tap='statusAgain'>重新提交</button>
			</view>
			<view class="email df ac sb mt15" v-else-if="user_info.grade == 0 && status == 1">
				<view class="f1">
					<p class="f14 cff8 f500 db">您的入驻资料正在审核中</p>
				</view>
				<!-- <button class="email-but" style="height: 52rpx;line-height: 52rpx;" @tap='goSettled'>免费入驻</button> -->
			</view>
			<view class="email df ac sb mt15" v-else-if="user_info.grade == 0 && info.is_mobile !== 1">
				<view class="f1">
					<p class="f14 cff8 f500 db">联系采购商需入驻供应商</p>
				</view>
				<button class="email-but" style="height: 52rpx;line-height: 52rpx;" @tap='goSettled'>免费入驻</button>
			</view>
			<view class="email df ac sb mt15"
				v-else-if="user_info.grade == 1 && !user_info.number_receive && info.view_type == 1 && info.is_mobile !== 1">
				<view class="f1">
					<p class="f14 cff8 f500 db">您可以免费领取3次报价次数</p>
				</view>
				<button class="email-but" style="height: 52rpx;line-height: 52rpx;" @tap='receives'>立即领取</button>
			</view>
			<view class="email df ac sb mt15"
				v-else-if="user_info.grade == 1 && user_info.number_receive && info.view_type == 1 && info.is_mobile !== 1">
				<view class="f1" v-if="user_info.free_number > 0">
					<p class="f14 cff8 f500 db">免费报价剩余次数：{{ user_info.free_number }}次</p>
				</view>
				<view class="f1" v-else>
					<p class="f14 cff8 f500 db" style="width: 430rpx;">您的免费报价次数已用完，升级会员可享无限报价次数。</p>
				</view>
				<button class="email-but" v-if="!user_info.free_number > 0 "
					style="height: auto;line-height: 1;width: 230rpx !important;border-radius: 200rpx;padding: 10rpx 0;"
					@tap='member'>开通会员<!-- <view style="font-size: 20rpx;margin-top: 8rpx;">平均10元/天</view> --></button>
			</view>
			<view class="email df ac sb mt15"
				v-else-if="user_info.grade == 1 && info.view_type == 2 && info.is_mobile !== 1&&is_login">
				<view class="f1">
					<p class="f14 cff8 f500 db">该订单仅限会员供应商查看</p>
				</view>
				<button class="email-but"
					style="height: auto;line-height: 1;width: 230rpx !important;border-radius: 200rpx;padding: 10rpx 0;"
					@tap='member'>开通会员<!-- <view style="font-size: 20rpx;margin-top: 8rpx;">平均10元/天</view> --></button>
			</view>
			<view class="email df ac sb mt15"
				v-else-if="info.view_type != 3&&user_info.grade == 2 && info.is_mobile !== 1">
				<view class="f1">
					<p class="f14 cff8 f500 db">您是会员供应商，可直接{{ info.is_quotation === 0 ? '查看联系方式' : '报价，报价后显示'}}</p>
				</view>
			</view>
			<view class="email df ac sb mt15"
				v-else-if="info.view_type == 3&&(user_info.grade != 2 || user_info.grade_type != 1)&&is_login">
				<view class="f1">
					<p class="f14 cff8 f500 db">该订单仅限至尊会员供应商查看</p>
				</view>
				<button class="email-but"
					style="height: auto;line-height: 1;width: 230rpx !important;border-radius: 200rpx;padding: 10rpx 0;"
					@tap='member'>开通会员<!-- <view style="font-size: 20rpx;margin-top: 8rpx;">平均10元/天</view> --></button>
			</view>
		</view>
		<view class="" v-if="info.is_quotation === 0">
			<!-- <view class="bgc10 h44 df ac sb pd015">
				<p class="f14 cf">关注公众号，免费获取最新订单提醒</p>
				<view class="gz-but" @tap="goWeb">关注</view>
			</view> -->
			<view class="opportunity">
				<!-- <img src="../../static/opportunity.png" alt="" @longtap="onLongTap"/>
				 -->
				<image src="../../static/opportunity.png" :show-menu-by-longpress="true" alt="" srcset="">
				</image>

			</view>
			<swiper class="detail-swiper bgcf pt10" :indicator-dots="true" :circular="true"
				indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff" :autoplay="true" interval="5000">
				<block v-for="(item, index) in info_num.new_demand_ad" :key="index">
					<swiper-item>
						<image class="detail-swiper" referrerPolicy='no-referrer' :src="item.thumb" @tap="onSwiper"
							:data-item="item" />
					</swiper-item>
				</block>
			</swiper>
		</view>
		<view class="tipsBox" style="padding-top:20rpx;" v-else-if="info.is_quotation != 0 && !is_purchaser">
			<view class="">
				<image src="@/static/modify/first.png" mode="heightFix"></image>
				<view class=""> 报价 </view>
			</view>
			<view class="firstCode"> > </view>
			<view class="betweenBox" style="top:20rpx">
				<image src="@/static/modify/second.png" mode="heightFix"></image>
				<view class=""> 发送至采购商 </view>
			</view>
			<view class="lastCode"> > </view>
			<view class="">
				<image src="@/static/modify/third.png" mode="heightFix"></image>
				<view class=""> 达成合作 </view>
			</view>
		</view>
		<view class="supplierBox" v-if="info.is_quotation !== 0">
			<h2 class="f16 c28 f600 db"> 报价供应商 </h2>
			<view class="supplierInnerBox" v-if="info.list.length != 0">
				<view class="supplier" v-for="(item,index) in info.list" :key="index">
					<!-- 至尊会员 -->
					<image v-if="item.grade&&item.grade_type==1" :class="{hs:item.status == 3}"
						:src="getImgSrc('/uploads/20250312/174174390867d0e7241000a.png')" mode="widthFix" />
					<!-- vip -->
					<image v-if="item.grade&&item.grade_type==0" :class="{hs:item.status == 3}"
						:src="getImgSrc('/uploads/20250312/174174393167d0e73b5d8f7.png')" mode="widthFix" />
					<!-- 优选供应商 -->
					<image v-if="!item.grade" :class="{hs:item.status == 3}"
						:src="getImgSrc('/uploads/20250312/174174394667d0e74a6d230.png')" mode="widthFix" />
					<view :class="'supplierCompany' + {hs:item.status == 3}" style="line-height: 40rpx;">
						{{ item.company }}
						<text v-if="item.status == 3"
							style="padding: 0 20rpx;border-radius: 30rpx;color: #FFF;background: red;font-size: 24rpx;margin-left: 10rpx;line-height: 40rpx;display: inline-block;">
							已驳回</text>
					</view>
					<!-- <image v-if="item.status == 3"
						src="https://cdn.xtwaixie.com/uploads/20240415/1713163836661cce3c03f45.png" mode="widthFix"
						style="width: 50rpx;height:50rpx;    width: 50rpx;padding-left: 10rpx;"></image> -->
					<view class="supplierCreated">
						{{dayjs(item.created_at).format('YYYY-MM-DD HH:mm')  }}
					</view>
				</view>
			</view>
			<view class="" v-else style="display: flex;flex-direction: column;align-items: center;justify-content: center;
			padding: 60rpx; 0 20rpx">
				<image
					:src="getImgSrc('/uploads/20231226/1703577518658a87aeed8d1uqhBoOfGm5do93a55c897f89dcf40165cbb7c4c8e956.png')"
					mode="widthFix" style="width: 80rpx;margin-bottom: 10rpx;height: auto;"></image>
				<view class="" style="font-size: 32rpx;color: #9da5b7;"> 暂无供应商报价 </view>
			</view>
		</view>
		<!-- 免责条款 -->
		<!-- <view class='bgcf mt10 pd15'>
  <view class='df ac'>
    <image class="img20" src="../../img/xq1.png" />
    <h2 class='f16 c28 f500 ml8'>免责条款</h2>
  </view>
  <rich-text class="content db mt15" nodes="{{content}}"></rich-text>
</view> -->
		<view class="pob btf1 pd715">
			<view class="df ac sb">
				<!-- <navigator url="/pages/demand/subDemand" hover-class="none" open-type="reLaunch" class='w166 h48 bgcff br24 df jc fc ac'>
      <span class='f16 cf f500'>发布需求</span>
      <span class='f10 cf'>可获得{{info_num.add_demand}}积分</span>
    </navigator> -->
				<view class="f10 df ac"
					style="color: #0098E1;flex-direction: column;justify-content: center;width:80rpx;" @click="collect">
					<view>
						<!-- /uploads/20240930/172766189766fa07497ac38.png  已收藏图片-->
						<image v-if="info.operate == 1" style="width: 50rpx;max-height: 50rpx;"
							:src="getImgSrc('/uploads/20240930/172766189766fa07497ac38.png')" mode="widthFix"></image>
						<image v-else style="width: 50rpx;max-height: 50rpx;"
							:src="getImgSrc('/uploads/20240930/172766156966fa06014722e.png')" mode="widthFix"></image>
					</view>
					<view>{{ info.operate == 1 ? '已收藏' : '收藏' }}</view>
				</view>
				<!-- <view class="pd015 more-btn-outer" @tap="onNaviTo" v-if="info.is_quotation != 0" data-path="/pages/demand/demand">
					<button class="more-btn tc h48 br24 jc ac">
						<text class="f16 cf f500">{{ is_purchaser && info.is_quotation != 0 ? '报价详情' : '更多订单' }}</text>
					</button>
					<view class="b-tag" v-if="count > 0">{{ count }}</view>
				</view> -->
				<view class="pd015 more-btn-outer" @tap="onNaviTo" data-path="/pages/demand/demand">
					<button class="more-btn tc h48 br24 jc ac">
						<text class="f16 cf f500">更多订单</text>
					</button>
					<view class="b-tag" v-if="count > 0">{{ count }}</view>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-if="info.is_deal === 1" @tap="deal">
					<span class="f16 cf f500 tc">已完成</span>
				</view>
				<view class="f1 h48 br24 df jc ac" style="background-color: #999;"
					v-else-if="type === 'user' && info.is_end">
					<span class="f16 cf f500 tc">已完成</span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-else-if="type === 'user' && info.status === 1">
					<span class="f16 cf f500 tc">询价中</span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-else-if="type === 'user' && info.status === 2">
					<span class="f16 cf f500 tc">审核中</span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-else-if="type === 'user' && info.status === 3">
					<span class="f16 cf f500 tc">已驳回</span>
				</view>
				<view class="f1 h48 br24 df jc ac" style="background-color: #999;"
					v-else-if="type === 'user' && info.status === 4">
					<span class="f16 cf f500 tc">已驳回</span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-else-if="type === 'user'">
					<span class="f16 cf f500 tc"></span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" v-else-if="info.is_mobile === 1" @tap="onContact">
					<span class="f16 cf f500 tc">联系采购商</span>
				</view>
				<view class="f1 h48 bgcr br24 df jc ac" @tap="end" v-else-if="info.is_end">
					<span class="f16 cf f500">已完成</span>
				</view>
				<!-- 				<view class="f1 h48 bgcr br24 df jc ac"
					v-else-if="(user_info.number_receive && info.view_type == 1 && user_info.free_number <= 0 && user_info.grade !== 2) || (info.view_type === 2 && user_info.grade !== 2)"
					@tap="onContact" style="display: flex;flex-direction: column;justify-content: center;">
					<span class="f16 cf f500"
						style="font-size: 26rpx;text-align: center;margin-bottom: 6rpx;">升级会员</span>
					<span class="f16 cf f500 tc"
						style="font-size: 26rpx;text-align: center;">{{info.is_quotation === 0 ? '查看联系方式' : '报价'}}</span>
				</view> -->

				<view class="f1 h48 bgcr br24 df jc ac" v-else @tap="onContact">
					<span v-if="is_login">
						<span class="f16 cf f500 tc">{{info.is_quotation === 0 ? '联系采购商' : '报价给采购商'}}</span>
					</span>
					<span v-else>
						<span class="f16 cf f500 tc">查看采购联系方式</span>
					</span>
				</view>

				<!-- <navigator url="/pages/demand/demand" hover-class="none" open-type="reLaunch" class='f1 h48 bgc10 br24 df jc ac'>
			<span class='f16 cf f500'>查看更多需求</span>
		</navigator> -->
			</view>
		</view>
		<!-- 联系采购商需入驻供应商 -->
		<van-popup :show="show_list[0]" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">{{info.is_quotation === 0 ? '联系采购商' : '报价'}}需入驻供应商</span>
			</p>
			<view class="df ac btf1 h48 mt15">
				<p class="w50 tc f16 c28" @tap.native="onClose">取消</p>
				<button class="share-but1 h48 c10" @tap="goSettled">免费入驻</button>
			</view>
		</van-popup>
		<van-popup :show="show_list[8]" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<!-- <span class="f16 c28 f500">请完善公司资料信息</span> -->
				<span class="f16 c28 f500">{{showTipsEight}}</span>
			</p>
			<view class="df ac btf1 h48 mt15">
				<p class="w50 tc f16 c28" @tap.native="onClose">取消</p>
				<button class="share-but1 h48 c10" @tap="goSettledInfo">去完善</button>
			</view>
		</van-popup>
		<!-- 免费领取次数 -->
		<van-popup :show="show_list[5]" round @close="onClose">
			<p class="db pd200 mt5 w311">
				<span class="f20 c28 f500 db tc">暂无报价次数</span>
				<span class="f16 db tc mt8">您可免费领取3次，或升级会员查看</span>
			</p>
			<view class="df ac btf1 h48">
				<button class="share-but1 h48 c10" @tap.native="receive">免费领取</button>
				<button class="share-but1 h48 c10" @tap="member">升级会员</button>
			</view>
		</van-popup>
		<!-- 截止 -->
		<van-popup :show="show_list[6]" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">该订单已完成报价，已无法进行报价</span>
			</p>
			<p class='df ac jc btf1 f16 c10 h48' @tap="onClose">我知道了</p>
		</van-popup>
		<van-popup :show="showDeal" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">该订单已完成，请参与其他订单报价</span>
			</p>
			<p class='df ac jc btf1 f16 c10 h48' @tap="onClose">我知道了</p>
		</van-popup>
		<van-popup :show="show_list[7]" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">报价审核中，请勿重复报价</span>
			</p>
			<p class='df ac jc btf1 f16 c10 h48' @tap="onClose">我知道了</p>
		</van-popup>
		<!-- 账户积分不足 -->
		<van-popup :show="show_list[1]" round>
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500" v-if="platform != 'ios'">您的积分不足,请先开通会员获取积分</span>
				<span class="f16 c28 f500" v-if="platform == 'ios'">您的积分不足</span>
			</p>
			<view class="df ac btf1 h60 mt15">
				<p class="w50 tc h60 f16 c28" style="line-height: 120rpx" @tap.native="onClose">取消</p>
				<button class="share-but1 h60 c10 df ac sa" v-if="platform != 'ios'" @tap="goVip1">
					<text style="height: 120rpx; line-height: 120rpx">立即开通</text>
				</button>
				<button class="share-but1 h60 c10 df ac sa" v-if="platform == 'ios'"
					style="flex-direction: column; position: relative" @tap="goVip2">
					<text style="height: 120rpx; line-height: 120rpx">成为会员供应商</text>
					<text style="
                            font-size: 24rpx;
                            position: absolute;
                            left: 50%;
                            transform: translateX(-50%);
                            bottom: 4rpx;
                            padding: 2rpx 10rpx;
                            border: 1px solid rgb(212, 51, 65);
                            border-radius: 10rpx;
                            color: rgb(212, 51, 65);
                            line-height: 30rpx;
                        "> 无限积分 </text>
				</button>
				<!-- <button class="share-but1 h48 c10" bindtap='goVip'>立即开通</button> -->
			</view>
		</van-popup>
		<!-- 查看图纸需入驻供应商 -->
		<van-popup :show="show_list[2]" round>
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">查看图纸需入驻供应商</span>
			</p>
			<view class="df ac btf1 h48 mt15">
				<p class="w50 tc f16 c28" @tap.native="onClose">取消</p>
				<button class="share-but1 h48 c10" @tap="goSettled">免费入驻</button>
			</view>
		</van-popup>
		<van-popup :show="showStatus" round>
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">企业资料未通过审核</span>
			</p>
			<view class="df ac btf1 h48 mt15">
				<p class="w50 tc f16 c28" @tap.native="onClose">取消</p>
				<button class="share-but1 h48 c10" @tap="statusAgain">重新提交</button>
			</view>
		</van-popup>
		<!-- 签订保密协议支付 -->
		<van-popup :show="show_list[3]" round>
			<p class="db pd200 mt5 w311">
				<span class="f16 c28 f500 db tc">签订保密协议</span>
				<!-- <span class='f16 c28 f500 db tc mt8'>需 <i class="cff8">{{info_num.view_demand}}积分</i></span> -->
				<span class="f14 cf5 db tc mt8">查看该图纸需要先签订保密协议</span>
			</p>
			<view class="df ac btf1 h48">
				<p class="w50 tc f16 c28" @tap.native="onClose">取消</p>
				<button class="share-but1 h48 c10" @tap="onAgreePay">立即签订</button>
			</view>
		</van-popup>
		<!-- 签订保密协议 -->
		<van-popup :show="show_list[4]" round>
			<span class="f16 c28 f500 db tc mt20 mt5 w311">夕腾外协标准保密协议</span>
			<scroll-view class="xy-box1 w311 mt10" :scroll-y="true">
				<view class="xy-content"> 作为查看本订单的前提条件，您在此向采购商（此订单发布人/单位）做出承诺如下： <view class="mt10">
						1、本订单、附件及相关数据（“保密信息”）均为采购商所有，仅限您准备报价，与采购商洽谈、实现及履行交易使用，不得用于除前述目的外的任何其他用途； </view>
					<view class="mt10">
						2、保密信息所涉知识产权及其他相关权利（“知识产权”）均归采购商或其他相关方所有，获准查看保密信息并不表示您获得任何知识产权授权，未经采购商同意，您无权对知识产权加以利用； </view>
					<view class="mt10">3、未经采购商同意，不得向任何第三方或公众披露保密信息；</view>
					<view class="mt10">4、您承诺将以不低于保护自己的秘密信息和专有信息同等的谨慎和保护措施（但无论如何不得低于合理注意的程度）来保护保密信息；</view>
					<view class="mt10">5、您承诺仅将保密信息披露给为实现1中所述目的不得不接触该信息的员工，并保证其遵守本承诺文件的规定；</view>
					<view class="mt10">6、如违反本承诺文件之规定，您承诺：</view>
					<view class="mt10">（1）无论故意与过失，应当立即停止侵害，并在第一时间采取一切必要措施防止保密信息的扩散和／或损失的增加，尽最大可能消除影响；</view>
					<view class="mt10">（2）如给采购商造成损失，应承担相应损害赔偿责任。</view>
				</view>
			</scroll-view>
			<view class="df ac btf1 h48 mt15">
				<p :class="'w50 df ac jc f16 h48 ' + (count_time == 0 ? 'c28' : 'bgcf7 c6b')" @tap.native="onClose">取消
				</p>
				<button :class="'share-but1 cf h48 ' + (count_time == 0 ? 'bgc10' : 'cfe')"
					@tap="onAgree">同意并继续({{ count_time }})</button>
			</view>
		</van-popup>
		<van-popup :show="ifStatus" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">您的详细资料

					<text v-if="status == 0">未填写</text>

					<text v-if="status == 1">正在审核中</text>
					<text v-if="status == 3">未通过审核</text>
					。</span>
			</p>
			<p class='df ac jc btf1 f16 c10 h48' @tap="onClose">我知道了</p>
		</van-popup>
		<van-popup :show="isSettle" round @close="onClose">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f16 c28 f500">{{ popup_content }}</span>
			</p>
			<view class="df ac btf1 h48 mt15" v-if="user_info.settle_status == 0 || user_info.settle_status == 3">
				<p class="w50 tc f16 c28" @tap.native="isSettle = false">取消</p>
				<button class="share-but1 h48 c10"
					@tap="statusAgain">{{ user_info.settle_status === 0 ? '免费入驻' : '重新提交' }}</button>
			</view>
			<p class='df ac jc btf1 f16 c10 h48' v-else @tap="isSettle = false">我知道了</p>
		</van-popup>
		<toast :value='showTipss' title='报价审核中，请勿重复报价' btnText='知道了' @change='showTipss=false' />
		<!-- 该订单为至尊会员订单 -->
		<van-popup :show="supremeVip" z-index='10000' :close-on-click-overlay='true'
			custom-style='background:rgba(0,0,0,0);' @close='close'>
			<view class="popupBox">
				<image referrerPolicy='no-referrer'
					src="https://cdn.xtwaixie.com/uploads/20250228/174073933167c1930300f18.png" mode="widthFix"
					class="popupImg" @click="member()" style="width: 610rpx;"></image>
			</view>
		</van-popup>
		<!-- 该订单为会员订单，需升级会员报价 -->
		<van-popup :show="vipDetail" z-index='10000' :close-on-click-overlay='true'
			custom-style='background:rgba(0,0,0,0);' @close='close'>
			<view class="popupBox">
				<image referrerPolicy='no-referrer'
					src="https://cdn.xtwaixie.com/uploads/20250228/174073928867c192d8aad4f.png" mode="widthFix"
					class="popupImg" @click="member()" style="width: 610rpx;"></image>
			</view>
		</van-popup>
		<!-- 您的免费报价次数已用完，升级会员可享无限报价次数 -->
		<van-popup :show="ifVip" z-index='10000' :close-on-click-overlay='true' custom-style='background:rgba(0,0,0,0);'
			@close='close'>
			<view class="popupBox">
				<image referrerPolicy='no-referrer'
					src="https://cdn.xtwaixie.com/uploads/20250228/174073931267c192f0eb5fa.png" mode="widthFix"
					class="popupImg" @click="member()" style="width: 610rpx;"></image>
			</view>
		</van-popup>
		<van-popup :show="firstPopup" custom-style='background:#00000000;'>
			<image src="https://cdn.xtwaixie.com/uploads/20240108/1704702779659bb33b1136b.png" mode="widthFix"
				style="width: 450rpx;padding-bottom: 800rpx;"></image>
		</van-popup>

		<van-popup :show="showPopup" z-index='10000' @close="showPopup = false" :close-on-click-overlay='true'
			:safe-area-inset-bottom="false" position="bottom" custom-style='background:rgba(0,0,0,0);'>
			<view class="popupBox">
				<!-- @click="goAdd()" -->
				<!-- getImgSrc(popupImg) -->
				<image referrerPolicy='no-referrer' @click="goAdd" :src="getImgSrc(popupImg)" mode="widthFix"
					class="popupImg" show-menu-by-longpress="true" :style="'width: 100%;'"></image>
			</view>
		</van-popup>

		<van-popup :show="showSupplement" round @close="showSupplement = false">
			<p class="df ac jc pd200 mt5 w311">
				<span class="f14 c28 f500">会员企业需补充资料，补充后即可正常使用</span>
			</p>
			<p class='df ac jc btf1 f16 c10 h48' @tap="goPages('/pages/Factoryinformation/Factoryinformation')">点击补充</p>
		</van-popup>

		<van-popup :show="showCenter" z-index='10000' :close-on-click-overlay='true'
			custom-style='background:rgba(0,0,0,0);' :safe-area-inset-bottom="false" position='bottom'
			@close='showCenter = false'>
			<view class="popupBox">
				<!-- getImgSrc('/uploads/20240930/172768083866fa51460cfb7.png') -->
				<image referrerPolicy='no-referrer' :src="getImgSrc('/uploads/20240930/172768083866fa51460cfb7.png')"
					mode="widthFix" class="popupImg" show-menu-by-longpress="true" style="width: 750rpx;"></image>
			</view>
		</van-popup>

		<model :value='showTips' title='提示' content="恭喜您已获得3次查看联系方式机会" :showdisagreeBtn='false' agreeBtn='确认'
			@change='showTips = false' @agree='showTips = false' color='#1A4FBF' />
	</view>
</template>
<script>
	import day from "../../utils/day.js"
	import {
		verifyPhoneNumber
	} from "@/utils/util"
	const http = require('../../utils/http');
	import {
		toast
	} from "@/component/toast.vue"
	import model from "@/component/model";
	import popUp from "@/component/new-popUp.vue"
	let debounceTimeout;
	export default {
		components: {
			toast,
			model,
			popUp
		},
		data() {
			return {
				is_login: false,
				dayjs: day,
				show_company: false, //公司
				showTipsEight: "查看图纸需完善企业资料",
				showSupplement: false,
				popupImg: '',
				showPopup: false,
				userIS: "",
				showCenter: false,
				showTips: false,
				type: '',
				show_list: [false, false, false, false, false, false, false, false, false],
				id: '',
				showTipss: false,
				info: {
					spare_parts_name: '',
					company: '',
					created_at: '',
					end_at: '',
					procurement_area: '',
					province: '',
					city: '',
					type: 0,
					list: [],
					file: [],
					drawing: [],
					file_name: '',
					is_secrecy: 0,
					is_tax_include: '',
					is_freight: '',
					is_budget: '',
					delivery_at: '',
					DemandParts: [],
					username: '',
					view_type: 0,
					mobile: '',
					email: '',
					quotation: null,
					id: 0,
				},
				is_info: '',
				info_num: {
					is_pay: 0,
					view_demand: '',
					new_demand_ad: []
				},
				see_title: '如何获取积分',
				official_show: '',
				img: '',
				num_jf: 0,
				share_num: '',
				count_time: 3,
				user_info: {},
				blink: false,
				count: '',
				// 未读数量
				platform: '',
				content: '',
				ifVip: false,
				vipDetail: false,
				grade: 0,
				status: 0,
				showStatus: false,
				ifStatus: false,
				firstPopup: false,
				showDeal: false,
				bh_reason: '',
				isShare: false,
				isClick: false,
				is_purchaser: false,
				settled_info: null,
				popup_content: '',
				isSettle: false,
				isLoggedIn: true, // 默认未登录手机号
				callback: null,
				supremeVip: false
			};
		},

		/**
		 * 生命周期函数--监听页面加载
		 */

		async onLoad(options) {
			if (options?.nameType) {
				this.is_purchaser = true
			}
			let scene = uni.getStorageSync('scene');
			if (scene == 1011 || scene == 1017 || scene == 1025 || scene == 1047 || scene == 1124) {
				this.official_show = true;
			} else {
				this.official_show = false;
			}
			this.type = options.type || ''
			this.id = options.id
			this.img = uni.getStorageSync('gz_img')
			let obj = uni.getSystemInfoSync();
			this.platform = obj.platform
			// this.is_infos= uni.getStorageSync('is_info')
			if (options.token) {
				this.isShare = true
				this.isClick = false
				uni.setStorageSync('token', options.options.token.token)
				setTimeout(() => {
					this.isShare = false
				}, 1000)
			}
			uni.showLoading({
				mask: true,
				title: '加载中....'
			})
			const token = uni.getStorageSync("token");
			await this.getInfo();
			if (token) {
				await this.getUserInfo();
			}
			uni.hideLoading();
			console.log(options?.routeType,"routeType")
			if (options?.routeType == 'template'&&this.verificationTime()) {
				uni.setStorageSync('template_time', day().format("YYYY-MM-DD"));
				let data = {
					page: 1,
					pageSize: 10,
					machining_id: '',
					province: "",
					city: "",
					status: 1,
					regular_tag: "",
					key: "",
					local: ""
				};
				http.request('demand/demandList', data).then((result) => {
					console.log()
					uni.showModal({
						title: '提示',
						content: `接单大厅还有${result.data.recordCount}笔订单待报价`,
						showCancel: false,
						success: function(res) {
							if (res.confirm) {
								uni.requestSubscribeMessage({
									tmplIds: [
										'Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA'
									],
									success(res) {
										if (res
											.Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA ==
											'accept') {
											http.request('demand/empower')
										}
									},
									fail(err) {
										console.log(err)
									}
								})
							} else if (res.cancel) {
								console.log('用户点击取消');
							}
						}
					});
				}).catch((res) => {
					uni.showToast({
						title: res.message,
						icon: 'none'
					});
				});

			}
			// if (this.isShare) {
			// 	setTimeout(async () => {
			// 		uni.showLoading({
			// 			title: '加载中....'
			// 		})
			// 		await this.getInfo();
			// 		await this.getUserInfo();
			// 		uni.hideToast();
			// 	}, 400)
			// }
			// if(this.isLoggedIn){

			// }


		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady() {},
		/**
		 * 生命周期函数--监听页面显示
		 */
		watch: {
			isShare(n, o) {
				if (!n) {
					uni.removeStorageSync('token')
					this.wxAuthLogin().then(() => {
						uni.showLoading({
							title: '加载中....'
						})
						this.getInfo();
						this.getUserInfo();
						// uni.hideLoading()
						this.isClick = true
					})
				}
			},

		},
		onShow(options) {

			const token = uni.getStorageSync("token");
			// let token = uni.getStorageSync('token')
			// 验证是否登录，是否有手机号
			// this.callback = verifyPhoneNumber()

			const login_code = uni.getStorageSync('is_login')

			// this.getInfo();
			if (token) {
				this.getInfo()
				// setTimeout(() => {
				this.getUserInfo();
				// }, 400)
			}
			this.show_list.map(el => el = false)
			this.$forceUpdate()

			// 判断零件信息是否遮盖
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide() {},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload() {
			clearTimeout(this.callback)
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh() {},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom() {},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage() {
			return {
				title: this.info.spare_parts_name,
				path: "pages/demand/demandDetails?id=" + this.id,
				// imageUrl: this.info.drawing[0],
			}
		},
		onShareTimeline() {
			return {
				title: this.info.spare_parts_name,
				query: 'id=' + this.id,
				path: "pages/demand/demandDetails",
				imageUrl: this.info.DemandParts[0]?.redrawing,
				// imageUrl:"https://image-apk-1310343798.cos.ap-nanjing.myqcloud.com/app%2Fbase%2F1ee82bdbe5634866838e33150941cef4_pcitem1025730701-682500000181a3ce9f7a0a230368_1280_1704.jpg.webp"
			}
		},
		methods: {
			// 判断当前时间和上次展示装修主页的时间是不是相差一天
			verificationTime() {
				let pre_time = uni.getStorageSync('template_time');
				console.log(pre_time)
				if (!pre_time) {
					return true
				}
				console.log('上次提示时间:', pre_time, day(pre_time).diff(day(), 'day'))
				console.log(day(pre_time).diff(day(), 'day') < 0)
				return day(pre_time).diff(day(), 'day') < 0
			},
			collect() {
				const token = uni.getStorageSync('token')
				if (!token) {
					this.goLogin()
					return
				}
				http.request('user/collect', {
					type: 1,
					relation_id: this.id,
					operate: this.info.operate == 1 ? 2 : 1
				}).then(res => {
					this.upData()
					uni.showToast({
						title: res.message.msg,
						icon: 'none'
					})
				}).catch(err => {
					uni.showToast({
						title: err.message.msg,
						icon: 'none'
					})
					// uni.showToast({
					// 	title:err.msesge
					// })
				})
			},
			upData() {
				http.request('demand/demandInfo', {
					type: this.type,
					id: this.id
				}).then(res => {
					this.info = {
						...this.info,
						operate: res.data.info.operate
					}
				})
			},
			close() {
				this.vipDetail = false
				this.ifVip = false
				this.supremeVip = false
			},
			removeQueryParam(url, paramToRemove) {
				let uri = decodeURI(url);
				let queryString = '';
				if (uri.includes('?')) {
					queryString = uri.split('?')[1];
					let params = queryString.split('&');
					let newParams = params.filter(function(item) {
						let [key, value] = item.split('=');
						return key !== paramToRemove;
					});
					if (newParams.length > 0) {
						queryString = '?' + newParams.join('&');
					} else {
						queryString = '';
					}
					uri = uri.split('?')[0] + queryString;
				}
				return uri;
			},
			// removeQueryParam(url, paramToRemove) {
			//   let uri = decodeURI(url)
			//   let arr = uri.split('?'):ml-citation[1]{data="citation-1"}.split('&')
			//   let newArr = arr.filter(function(item) {
			//     return item.split('=') !== paramToRemove;
			//   });
			//   let newUrl = '?' + newArr.join('&');
			//   return newUrl;
			// },
			removeUrlParam(url, paramToRemove) {
				let urlObj = new URL(url);
				urlObj.searchParams.delete(paramToRemove);
				return urlObj.toString();
			},
			goLogin() {
				uni.showToast({
					title: '您还未登录，请先登录',
					icon: 'none'
				});
				this.callback = setTimeout(() => {
					uni.navigateTo({
						url: '/pages/login/login'
					});
				}, 1000);
			},
			// 联系采购商
			onContact() {
				this.callback = verifyPhoneNumber(false,false)
				if (this.callback) {
					uni.navigateTo({
						url: '/pages/settled/setPage'
					});
					return
				}
				// let token = uni.getStorageSync('token')
				// if (!token) {
				// 	uni.showToast({
				// 		title: '您还未登录，请先登录',
				// 		icon: 'none'
				// 	});
				// 	this.callback = setTimeout(() => {
				// 		uni.navigateTo({
				// 			url: '/pages/login/login'
				// 		});
				// 	}, 1000);
				// 	return;
				// }
				if (this.user_info.grade == 1 && this.user_info.is_info == 0) {
					let text = ''
					if (this.info.is_mobile == 1) {
						text = '联系采购商需完善企业资料'
					} else {
						if (this.info.is_quotation == 0) {
							text = '联系采购商需完善企业资料'
						} else {
							text = '报价需完善企业资料'
						}
					}
					// this.show_list[8]=true
					uni.showModal({
						title: '提示',
						content: text,
						cancelText: "取消", // 取消按钮的文字  
						confirmText: "去完善", // 确认按钮的文字  
						success: (res) => {
							if (res.confirm) {
								this.goSettledInfo()
							} else {}
						}
					})
					return
				}
				// 至尊会员订单
				if (this.user_info.grade_type != 1 && this
					.info.view_type == 3) {
					this.supremeVip = true
					return
				}
				// uni.navigateTo({
				// 	url: 'weixin://profile/gh_e0324b2829b8'
				// });
				// return
				// 验证手机登录
				// let token = uni.getStorageSync('token')
				// if (!token || !this.user_info.mobile) {
				// 	this.goLogin()
				// 	return false;
				// }
				// const info = this.user_info
				// 判断入驻供应商状态
				if (this.user_info.settle_status != 2) {
					this.isSettle = true
					this.popup_content = this.user_info.settle_status === 0 ? '联系采购商需入驻供应商' : this.user_info
						.settle_status === 1 ? '您的入驻资料正在审核' : '您的入驻资料未通过审核'
					return
				}
				// 判断是否是未注册用户
				if (this.user_info.grade == 0) {
					// 判断用户详细资料
					if (this.status != 2) {
						// 展示工厂申请状态页面
						this.ifStatus = true

						return
					}
					// 打开入驻供应商界面
					this.show_list[0] = true
					this.$forceUpdate()
					// 判断用户是会员、有手机号、没有工厂信息
				} else if (this.user_info.mobile && this.user_info.grade == 2 && !this.user_info.settledInfoStatus) {
					// 补充会员企业资料
					this.showSupplement = true
					return
					// 判断用户有手机号、普通用户、没领免费次数、和商家是免费单
				} else if (this.user_info.mobile && this.user_info.grade == 1 && !this.user_info.number_receive && this
					.info.view_type == 1) {
					// 显示免费领取次数界面
					this.showPopup = true
					return
					// 用户的工厂详细资料状态没成功
				} else if (this.status != 2) {
					// 展示工厂申请状态页面
					this.ifStatus = true
					// 用户没有工厂信息，用户不是普通用户
				} else if (!this.user_info.settledInfoStatus && this.user_info.grade != 1) {
					this.scrollToTop()
					return
					this.show_list[8] = true
					this.$forceUpdate()
					// 商家有手机号
				} else if (this.info.is_mobile == 1) {
					const that = this
					// 给商家拨号
					uni.makePhoneCall({
						phoneNumber: this.info.mobile,
						// 确定就传送联系记录
						success: (res) => {
							http.request('user/collect', {
								type: 2,
								relation_id: this.id,
								operate: 1
							}).then(res => {})
						},

					});

					return false;
					// 用户是普通用户，用户没有领取免费次数，商家是免费单
				} else if (this.user_info.grade == 1 && !this.user_info.number_receive && this.info.view_type == 1) {
					this.scrollToTop()
					return
					this.receives()
					// 用户是普通用户，用户领了免费次数，商家是免费单，用户免费次数用完
				} else if (this.user_info.grade == 1 && this.user_info.number_receive && this.info.view_type == 1 && this
					.user_info.free_number <= 0) {
					this.ifVip = true
					// if (this.info.is_quotation === 1) {
					// 	this.goQuotation(1)
					// } else {
					// 	this.ifVip = true
					// }
					// 用户是普通用户，商家是vip单
				} else if (this.user_info.grade == 1 && this.info.view_type == 2) {
					// 提示该订单是vip订单
					this.vipDetail = true
					this.$forceUpdate()
					// 商家有报价，然后有报价审核状态
				} else if (this.info.quotation && this.info.quotation.status === 1) {
					// 展示报价审核状态界面
					this.showTipss = true
				} else {
					// 如果商家有报价
					if (this.info.is_quotation === 1) {
						// 前往报价页面
						this.goQuotation()
					} else {
						// 查看积分需求
						this.onViewNow();
					}
				}
			},
			end() {
				this.show_list[6] = true
				this.$forceUpdate()
			},
			deal() {
				this.showDeal = true
			},
			statusAgain() {
				this.showStatus = false
				this.isSettle = false

				uni.navigateTo({
					url: this.user_info.grade != 0 ?
						'/pages/Factoryinformation/Factoryinformation' : "/pages/editSettled/editSettled"
				})
			},
			// 报名页面
			goQuotation(i = 0) {
				uni.navigateTo({
					url: `/pages/quotation/quotation?index=${i}&delivery=${this.info.province + this.info.city}&id=${this.id}&spare_parts_name=${this.info.spare_parts_name}${this.info.is_freight ? '&is_freight='+this.info.is_freight : ''}${this.info.is_tax_include ? '&is_tax_include=' + this.info.is_tax_include : ''}`
				})
				this.show_quotation = false
			},
			scrollToTop() {
				setTimeout(() => {
					this.blink = true
					setTimeout(() => {
						this.blink = false
					}, 1000);
				}, 100);
				this.$nextTick(() => {
					uni.pageScrollTo({
						scrollTop: 0,
						duration: 300 // 动画时长，默认300ms
					});
				})
			},
			// 查看图纸
			goDrawing(e, _dataset) {
				this.handleDataset(e, _dataset);
				// let name=e.currentTarget.dataset.name
				let name = null
				// uni.showToast({
				// 	title: 'title',
				// 	icon: 'none'
				// });
				if (e.currentTarget.dataset.name) {
					name = JSON.stringify(e.currentTarget.dataset.name).replace(/[\s=]/g, '')
				}
				if (name) {
					if (name.includes('&')) {
						let array = JSON.parse(name);
						let namess = array.map(item => item.replace(/&/g, ''));
						name = JSON.stringify(namess)
					}
				}
				// 输出最终的数组  
				let img = JSON.stringify(e.currentTarget.dataset.img);
				let file = JSON.stringify(e.currentTarget.dataset.file);
				let lj_name = e.currentTarget.dataset.lj_name;
				let i = e.currentTarget.dataset.i;
				let token = uni.getStorageSync('token')
				if (!token) {
					uni.showToast({
						title: '您还未登录，请先登录',
						icon: 'none'
					});
					this.callback = setTimeout(() => {
						uni.navigateTo({
							url: '/pages/login/login'
						});
					}, 1000);
					return false;
				}
				// 判断订单id和发布人id是否一致
				if (this.info.uid != this.user_info.id) {
					if (this.user_info.settle_status != 2) {
						this.isSettle = true
						this.popup_content = this.user_info.settle_status === 0 ? '查看图纸需入驻供应商' : this.user_info
							.settle_status === 1 ? '您的入驻资料正在审核' : '企业资料未通过审核'
						return
					}
				}
				if (this.user_info.grade == 0 && this.user_info.id != this.info_num.userInfo.id) {
					if (this.status == 1) {
						this.ifStatus = true
						return
					}
					if (this.status == 3) {
						this.showStatus = true
						this.$forceUpdate()
						return
					}
					this.show_list[2] = true
					this.$forceUpdate()
				} else if (this.user_info.mobile && this.user_info.grade == 2 && !this.user_info.settledInfoStatus) {
					this.showSupplement = true
					return
				} else if (!this.user_info.settledInfoStatus && this.user_info.grade == 2) {
					this.scrollToTop()
					return
					this.show_list[8] = true
					this.$forceUpdate()
				} else if (this.info.is_secrecy == 1) {

					this.show_list[3] = true
					this.$forceUpdate()
				} else if (this.status == 3) {

					this.showStatus = true
					this.$forceUpdate()
				} else if (this.status == 1) {
					this.ifStatus = true
					this.$forceUpdate()
				} else {

					let first = uni.getStorageSync("firstPopup")
					if (!first) {
						this.firstPopup = true
						uni.setStorageSync('firstPopup', true)
					}
					let that = this
					that.firstPopup = false
					if (that.user_info.grade == 1 && that.info.view_type == 2) {
						uni.navigateTo({
							url: '/pages/demand/drawing?name=' + name + '&file=' + file + '&img=' + img +
								'&lj_name=' + lj_name + '&decrypt=' + encodeURIComponent(that.info
									.decrypt) + '&decrypt_time=' + that.info.decrypt_time +
								'&userType=noVip' +
								`&id=${that.id}`
						});
					} else {
						if (that.user_info.grade == 2) {
							uni.navigateTo({
								url: '/pages/demand/drawing?name=' + name + '&file=' + file + '&img=' +
									img + '&lj_name=' + lj_name + '&decrypt=' + encodeURIComponent(that
										.info.decrypt) + '&decrypt_time=' + that.info.decrypt_time +
									`&id=${that.id}` + '&grade=grade'
							});
						} else {

							uni.navigateTo({
								url: '/pages/demand/drawing?name=' + name + '&file=' + file + '&img=' +
									img + '&lj_name=' + lj_name + '&decrypt=' + encodeURIComponent(that
										.info.decrypt) + '&decrypt_time=' + that.info.decrypt_time +
									`&id=${that.id}`
							});
						}
					}
				}
			},
			goPages(url) {
				uni.navigateTo({
					url: url
				})
			},
			// 去入驻
			goSettled() {
				uni.navigateTo({
					url: '/pages/settled/setPage'
				});
			},
			goSettledInfo() {
				uni.navigateTo({
					url: '/pages/Factoryinformation/Factoryinformation'
				});
			},
			quotationUrl(info) {
				uni.navigateTo({
					url: '/pages/quotationDetail/quotationDetail?type=user&id=' + info.id + '&quotationId=' + info
						.quotation.id
				});
			},
			receives() {
				// this.show_list[5] = true
				this.showPopup = true
				this.$forceUpdate()
			},
			receive() {
				uni.redirectTo({
					url: '/pages/my/my'
				});
			},
			member() {
				let token = uni.getStorageSync('token')
				if (!token) {
					uni.showToast({
						title: '您还未登录，请先登录',
						icon: 'none'
					});
					this.callback = setTimeout(() => {
						uni.navigateTo({
							url: '/pages/login/login'
						});
					}, 1000);
					return;
				}
				this.vipDetail = false
				this.ifVip = false
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				});
				// if (this.platform === 'ios') {
				// 	uni.navigateTo({
				// 		url: '/pages/recharge/iosvip'
				// 	});
				// } else {
				// 	uni.navigateTo({
				// 		url: '/pages/recharge/recharge'
				// 	});
				// }
			},
			member2() {
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				});
			},
			// 点击复制
			copyText(e, _dataset) {
				/* ---处理dataset begin--- */
				this.handleDataset(e, _dataset);
				/* ---处理dataset end--- */
				let text = e.currentTarget.dataset.text;
				uni.setClipboardData({
					data: text,
					success(res) {
						uni.getClipboardData({
							success(res) {
								uni.showToast({
									title: '复制成功',
									icon: 'none'
								});
							}
						});
					}
				});
			},
			// 保密显示显示
			onAgreement(e) {
				let i = e.currentTarget.dataset.i;
				this.show_list[3] = true
				this.$forceUpdate()
			},
			// 去签订保密协议
			onAgreePay() {
				this.onClose();
				this.show_list[4] = true
				this.$forceUpdate()
				this.count_time = 3
				let count = setInterval(() => {
					this.count_time--;
					if (this.count_time == 0) {
						clearInterval(count);
					}
				}, 1000);
			},
			// 同意签协议
			onAgree() {
				if (this.count_time == 0) {
					let data = {
						id: this.id
					};
					http.request('demand/secrecy', data).then((res) => {
						uni.showToast({
							title: res.message
						});
						this.onClose();
						this.getInfo();
					}).catch((res) => {
						uni.showToast({
							title: res.message,
							icon: 'none'
						});
					});
				}
			},
			// 去查看公众号
			goWeb() {
				uni.navigateTo({
					url: '/pages/webview/webview'
				});
			},
			// 打电话
			onCall(e, _dataset) {
				/* ---处理dataset begin--- */
				this.handleDataset(e, _dataset);
				/* ---处理dataset end--- */
				let mobile = e.currentTarget.dataset.mobile;
				if (mobile == '****') {
					return false;
				}
				uni.makePhoneCall({
					phoneNumber: mobile
				});
			},
			//  查看图片
			onImg(e) {
				let src = e.currentTarget.dataset.src;
				let path = e.currentTarget.dataset.path;
				uni.previewImage({
					urls: path,
					current: src
				});
			},
			// 关闭
			onClose() {
				this.show_list = [false, false, false, false, false, false, false, false]
				this.showStatus = false
				this.ifStatus = false
				this.showDeal = false
				this.$forceUpdate()
			},
			onNaviTo(e) {
				let path = e.currentTarget.dataset.path;
				uni.redirectTo({
					url: path
				});
			},
			// 获取详情
			getInfo() {
				return http.request('demand/demandInfo', {
					type: this.type,
					id: this.id
				}).then((res) => {
					let content = res.data.disclaimer_agreement.replace(/<img/g, '<img class="rich-text-img"');
					if (res.data.info.basic) {
						res.data.info.basic = JSON.parse(res.data.info.basic)
					}
					this.info = res.data.info
					this.info_num = res.data
					this.content = content
					this.count = res.data.count
					this.is_info = res.data.info.is_info
					if (res.data.is_pay == 1) {
						http.request('demand/getIp', {
							type: 4,
							id: this.id
						}).then(res => {})
					}
				}).catch((res) => {});

				http.request('base/configData').then(res => {
					this.popupImg = res.data.personal_center
				})
			},
			// 支付积分查看需求
			onViewNow() {
				let data = {
					id: this.id
				};
				http.request('demand/seeDemand', data).then((res) => {
					this.info.company = res.data.company
					this.info.email = res.data.email
					this.info.mobile = res.data.mobile
					this.info.username = res.data.username
					this.info.is_mobile = res.data.is_mobile
					this.info_num.is_pay = 1
					this.info_num.user_demand = res.data.user_demand
					if (res.data.basic) {
						this.info.basic = JSON.parse(res.data.basic)
					}
					this.onClose();
				}).catch((res) => {
					if (res.code == 206) {
						this.show_list[5] = true
						this.$forceUpdate()
					} else if (res.code == 207) {
						let that = this;
						uni.showModal({
							title: '提示',
							content: res.message,
							success(res) {
								if (res.confirm) {
									that.member();
								}
							}
						});
					} else {
						uni.showToast({
							title: res.message,
							icon: 'none'
						});
					}
				});
			},
			onSwiper(e) {
				let item = e.currentTarget.dataset.item;
				if (item.url_type == 12) {
					uni.navigateTo({
						url: '/subPack/factoryDetails/factoryDetails?id=' + item.goods_id
					});
					return
				}
				if (item.url == '/pages/landing/landing') {
					uni.navigateTo({
						url: '/pages/landing/landing'
					});
					return
				}
				if (item.url_type === 6) {
					uni.navigateTo({
						url: '/pages/recharge/recharge'
					});
					// if (uni.getSystemInfoSync().platform === 'ios') {
					// 	uni.navigateTo({
					// 		url: '/pages/recharge/iosvip'
					// 	});
					// } else {
					// 	uni.navigateTo({
					// 		url: '/pages/recharge/recharge'
					// 	});
					// }
					return
				}
				switch (item.url_type) {
					case 1:
						uni.redirectTo({
							url: '/pages/demand/subDemand'
						});
						break;
					case 2:
						uni.navigateTo({
							url: '/pages/order/shopDetail?id=' + item.goods_id
						});
						break;
					case 3:
						uni.redirectTo({
							url: '/pages/shopping/shopping'
						});
						break;
					case 4:
						uni.navigateTo({
							url: '/pages/content/content?id=' + item.id
						});
						break;
					case 5:
						uni.navigateTo({
							url: '/pages/settled/setPage'
						});
						break;
					case 7:
						uni.navigateTo({
							url: '/subPack/out/out?url=' + item.url
						});
						break;
					case 8:
						uni.navigateTo({
							url: '/pages/demand/demand'
						});
						break;
					case 9:
						uni.navigateTo({
							url: '/pages/myQuotation/myQuotation'
						});
						break;
					case 10:
						uni.navigateTo({
							url: '/pages/myInquiry/myInquiry'
						});
						break;
					case 11:
						uni.redirectTo({
							url: '/pages/shopping/shopping'
						});
						break;
				}
			},
			// 去刀具商城
			goShop() {
				uni.reLaunch({
					url: '/pages/shopping/shopping'
				});
			},
			// 获取个人信息
			getUserInfo(status = false) {
				let p1 = new Promise((resolve, reject) => {
					http.request('user/userInfo').then((res) => {
						if (status) {
							this.showTips = true
							setTimeout(() => {
								this.showTips = false
							}, 2000);
						}
						this.grade = res.data.userInfo.grade
						this.user_info = res.data.userInfo
						this.user_info.is_info = res.data.is_info
						if (this.user_info.mobile && this.user_info.grade == 2 && !this.user_info
							.settledInfoStatus) {
							this.showSupplement = true
						}
						this.userIS = res.data.is_info
						if (res.data.userInfo.status != 1) {
							uni.showToast({
								title: '该账号已被冻结',
								icon: 'none'
							});
							setTimeout(() => {
								uni.navigateBack({
									delta: 1
								});
							}, 1000);
						} else {
							this.is_login = true
						}
						resolve(res)
					}).catch((err) => {
						uni.showToast({
							title: err.message,
							icon: 'none'
						});
						reject(err)
					});
				})
				let p2 = new Promise((resolve, reject) => {
					http.request('user/settledInfo').then((res) => {
						this.status = res.data.info.detail.status
						this.bh_reason = res.data.info.reason
						// if(res.data.info.basic){
						// 	res.data.info.basic=JSON.parse(res.data.info.basic)
						// 	// this.basicName = jsonObject.Name
						// 	// this.basicResult = jsonObject.Result
						// 	// this.basicAddress = jsonObject.Address
						// 	// this.basicOperName = jsonObject.OperName
						// 	// this.basicEconKind = jsonObject.EconKind
						// 	// this.basicStartDate = jsonObject.StartDate
						// 	// this.basicRegistCapi = jsonObject.RegistCapi
						// 	// this.basicCreditCode = jsonObject.CreditCode
						// 	// this.basicStatus = jsonObject.Status
						// 	// this.basicRecCap = jsonObject.RecCap
						// 	// this.basicScope = jsonObject.Scope
						// 	// this.basicNo = jsonObject.basicNo
						// }
						this.settled_info = res.data.info
						// console.log(this.settled_info.basic.Address,"asdsadasd")
						resolve(res)
					}).catch((err) => {
						uni.showToast({
							title: err.message,
							icon: 'none'
						});
						reject(err)
					})
				})
				return Promise.all([p1, p2])
				// return new pr
			},
			goAdd() {
				let first = uni.getStorageSync("firstPopup")
				if (!first) {
					this.firstPopup = true
					uni.setStorageSync('firstPopup', true)
				}
				let popupTime = uni.getStorageSync('popupTime');
				if (popupTime) {
					let nowDate = new Date().setHours(0, 0, 0, 0)
					if (nowDate > popupTime) {
						let that = this
						uni.requestSubscribeMessage({
							tmplIds: ['Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA'],
							success(res) {
								if (res.Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA == 'accept') {
									http.request('demand/empower')
									uni.setStorageSync('popupTime', new Date().getTime())
								}
								that.firstPopup = false
								http.request('user/receive', {}).then((res) => {
									if (res.code == 200) {
										http.request('user/userInfo').then((res) => {
											this.user_info = {
												...this.user_info,
												number_receive: res.data.userInfo
													.number_receive
											}
										})
									}
									that.showPopup = false
									that.showCenter = false
									that.showTips = true
									setTimeout(() => {
										that.showTips = false
									}, 2000);
								}).catch((res) => {
									that.showPopup = false
									uni.showToast({
										title: res.message,
										icon: 'none'
									});
								});
							}
						})
					} else {
						let that = this
						that.firstPopup = false
						http.request('user/receive', {}).then((res) => {
							if (res.code == 200) {
								http.request('user/userInfo').then((res) => {
									this.user_info = {
										...this.user_info,
										number_receive: res.data.userInfo.number_receive
									}
								})
							}
							that.showCenter = false
							that.showTips = true
							that.showPopup = false
							setTimeout(() => {
								that.showTips = false
							}, 2000);
						}).catch((res) => {
							that.showPopup = false
							uni.showToast({
								title: res.message,
								icon: 'none'
							});
						});
					}
				} else {
					let that = this
					uni.requestSubscribeMessage({
						tmplIds: ['Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA'],
						success(res) {
							if (res.Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA == 'accept') {
								http.request('demand/empower')
								uni.setStorageSync('popupTime', new Date().getTime())
							}
							that.firstPopup = false
							http.request('user/receive', {}).then((res) => {
								if (res.code == 200) {
									http.request('user/userInfo').then((res) => {
										this.user_info = {
											...this.user_info,
											number_receive: res.data.userInfo.number_receive
										}
									})
								}
								that.showCenter = false
								that.showTips = true
								that.showPopup = false
								setTimeout(() => {
									that.showTips = false
								}, 2000);
							}).catch((res) => {
								uni.showToast({
									title: res.message,
									icon: 'none'
								});
							});
						}
					})
				}
			},
			// 去充值
			goVip1() {
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				});
			},

			goVip2() {
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				});
				// uni.navigateTo({
				// 	url: '/pages/recharge/iosvip'
				// });
			},
			wxAuthLogin() {
				return new Promise((reslove, reject) => {
					let that = this;
					uni.login({
						complete: (res) => {
							// let data ={
							// 	code: res.code
							// }
							let data
							if (!this.isShare) {
								uni.setStorageSync('code', res.code)
								data = {
									code: res.code
								}
							} else {
								data = {
									code: uni.getStorageSync('code')
								}
							}
							let h = {
								'content-type': 'application/x-www-form-urlencoded'
							};
							uni.request({
								url: http.appUrl + 'login/getLogin',
								data: data,
								method: 'POST',
								header: h,
								success: (res) => {
									uni.setStorageSync('token', res.data.data.token.token);
									uni.setStorageSync('is_login', res.data.code);
									reslove();
								},
								fail(res) {}
							});
						}
					});
				});
			},
			// 登录判断是否跳转login页
			isLoginIphone() {
				// 跳转到登录页面
				uni.navigateTo({
					url: '/pages/login/login'
				});
			},
			// 查看图纸订阅通知
			allowNotifications(event, params) {
				
				let token = uni.getStorageSync('token')
				if (!token) {
					uni.showToast({
						title: '您还未登录，请先登录',
						icon: 'none'
					});
					this.callback = setTimeout(() => {
						uni.navigateTo({
							url: '/pages/login/login'
						});
					}, 1000);
					return;
				}
				// 弹窗提示
				if (this.user_info.grade == 1 && this.user_info.is_info == 0) {
					// this.showTipsEight='查看图纸需完善企业资料'
					// this.show_list[8]=true
					uni.showModal({
						title: '提示',
						content: '查看图纸需完善企业资料',
						cancelText: "取消", // 取消按钮的文字  
						confirmText: "去完善", // 确认按钮的文字  
						success: (res) => {
							if (res.confirm) {
								this.goSettledInfo()
							} else {}
						}
					})
					return
				}
				// let key = 'X5UgYbTKPQn_PmMMUKoZOV7iH_ON5vpemjP4QThHFjo' //询价通知
				let key = 'Ps_TGNHTlkFPLHybskEltaWoAvSZ1GhsoXfiJBGwTjA' //新订单通知
				let that = this
				uni.requestSubscribeMessage({
					tmplIds: [key], // 替换为你的模板 ID
					success(res) {
						// 判断用户是否同意订阅
						// if (res[key] === 'accept') {
						// 	that.goDrawing(event, params);
						// }else{
						// 	uni.showModal({
						// 		title: '提示',
						// 		content: '需点击订阅消息->订阅询价通知',
						// 		cancelText: "取消", // 取消按钮的文字  
						// 		confirmText: "跳转", // 确认按钮的文字  
						// 		success: (res) => {
						// 			if (res.confirm) {
						// 				uni.openSetting({
						// 					withSubscriptions:true,
						// 					success: function(res) {
						// 					},
						// 					fail: function(err) {
						// 					}
						// 				})
						// 			} else {
						// 			}
						// 		}
						// 	})
						// }
						that.goDrawing(event, params);
					},
					fail(err) {
						that.goDrawing(event, params);
						// if (err.errCode == '20004') {
						// 	uni.showToast({
						// 		title: "用户关闭了主开关，无法进行订阅",
						// 		icon: 'none'
						// 	})
						// 	uni.showModal({
						// 		title: '提示',
						// 		content: '请先打开通知开关',
						// 		cancelText: "取消", // 取消按钮的文字  
						// 		confirmText: "跳转", // 确认按钮的文字  
						// 		success: (res) => {
						// 			if (res.confirm) {
						// 				uni.openSetting({
						// 					withSubscriptions:true,
						// 					success: function(res) {
						// 					},
						// 					fail: function(err) {
						// 					}
						// 				})
						// 			} else {
						// 			}
						// 		}
						// 	})
						// }
					},
				});
			},
		}
	};
	// 保存图片
	// saveImage() {
	//   let t = this;
	//   wx.showLoading({
	//     title: "保存中...",
	//     mask: true,
	//   });
	//   wx.downloadFile({
	//     url: t.data.img,
	//     success (res) {
	//       if (res.statusCode === 200) {
	//         let img = res.tempFilePath;
	//         wx.saveImageToPhotosAlbum({
	//           filePath: img,
	//           success(res) {
	//             wx.showToast({
	//               title: "保存成功",
	//               icon: "success",
	//               duration: 2000,
	//             });
	//             t.onClose();
	//           },
	//           fail(res) {
	//             t.onClose();
	//             wx.showToast({
	//               title: "保存失败",
	//               icon: "none",
	//               duration: 2000,
	//             });
	//           },
	//         });
	//       }
	//     },
	//   });
	// },
	// 分享次数
	// getShareNum() {
	//   http
	//     .request("base/userShareNumber")
	//     .then((res) => {
	//       this.setData({
	//         share_num: res.data.number,
	//       });
	//     })
	//     .catch((res) => {
	//     });
	// },
	// 查看弹框
	// onSee(e) {
	//   let i = e.currentTarget.dataset.type;
	//   let status = this.data.show_list[i];
	//   this.onClose();
	//   this.setData({
	//     [`show_list[${i}]`]: !status,
	//     see_title: "如何获取积分",
	//   });
	// },
	// 分享次数提醒
	// onShareTips() {
	//   wx.showToast({
	//     title: "每日最多可分享2次，您今日已分享过2次啦~",
	//     icon: "none",
	//   });
	// },
</script>
<style lang="scss">
	@import './demandDetails.css';

	.BusiN-t {
		display: flex;
		text-align: center;
		font-size: 13px;
		line-height: 30px;
		width: 100%;
		border-top: 1px solid gainsboro;

		.Busi-left {
			background-color: #cef6fc;
			width: 34%;
			border-right: 1px solid gainsboro;
		}

		.Busi-right {
			width: 64%;
			padding: 0 1%;
		}
	}

	.Business-Infor {
		font-size: 12px;
		text-align: center;

		>view {
			display: flex;
			line-height: 30px;
			border-top: 1px solid gainsboro;
		}

		.Business-Miao {
			width: 68%;
			padding: 0 1%;
			border-left: 1px solid gainsboro;
			border-right: 1px solid gainsboro;
		}

		.Business-title {
			width: 30%;
			border-left: 1px solid gainsboro;
		}
	}

	.demandDetails {


		.demand_tit {
			&>span {
				margin-right: 10rpx;
			}
		}

		.supplierBox {
			box-sizing: border-box;
			padding: 30rpx 30rpx 40rpx;
			background-color: #fff;

			.supplierInnerBox {
				.supplier {
					margin-top: 20rpx;
					display: flex;
					align-items: center;
					font-size: 28rpx;
					color: #283043;
					position: relative;

					.supplierCreated {
						position: absolute;
						right: 0;
						top: 50%;
						transform: translateY(-50%);
					}

					.supplierCompany {
						word-break: break-all;
						max-width: calc(100% - 60rpx);
					}
				}

				.hs {
					filter: grayscale(100%);
					color: #999;
				}

				// .supplier > image {
				// 	filter: grayscale(100%);
				// }
				// .supplier > .supplierCompany {
				// 	color: #999;
				// }
				image {
					height: auto;
					width: 50rpx;
					margin-right: 10rpx;
				}
			}
		}

		.tipsBox {
			margin: 10rpx auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			box-sizing: border-box;
			position: relative;

			image {
				height: 40rpx;
				width: auto;
				margin-bottom: 6rpx;
			}

			>view {
				width: 33.33%;
				line-height: 1;
			}

			.firstCode {
				width: auto;
				position: absolute;
				top: 50%;
				left: 33.33%;
				transform: translate(-150%, -50%);
				font-size: 40rpx;
				color: #283043;
			}

			.lastCode {
				width: auto;
				position: absolute;
				top: 50%;
				right: 33.33%;
				transform: translate(100%, -50%);
				font-size: 40rpx;
				color: #283043;
			}

			view {
				display: flex;
				flex-direction: column;
				align-items: center;
				color: #283043;
				font-size: 28rpx;
			}

			.betweenBox {
				position: absolute;
				top: 0;
				left: 50%;
				transform: translateX(-50%);
			}
		}
	}

	.pt15 {
		position: relative;
	}

	// 阴影遮盖
	.detailedness_box_after {
		position: absolute;
		top: 0;
		left: -10%;
		// height:270%;
		height: 200%;
		width: 120%;
		background: rgba(0, 0, 0, 0.8);
		z-index: 99;
		font-weight: bold;
		font-size: 30rpx;
		display: flex;
		// align-items: center;
		justify-content: center;
		padding-top: 50%;
	}

	.detailedness_btn {
		display: block;
		width: 80px;
		height: 30px;
		background-color: rgb(16, 81, 199);
		border-radius: 10px;
		text-align: center;
		line-height: 30px;
		margin: 20px auto;
		// position: absolute;

	}

	.scroll {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: hidden;
		/* 禁用滚动条 */
	}

	.opportunity {
		width: 100%;
		height: 200rpx;

		image {
			width: 100%;
			height: 100%;
			background-size: cover;
		}
	}
</style>